home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume2 / kaleid2 / part01 next >
Encoding:
Internet Message Format  |  1988-12-22  |  33.9 KB

  1. Path: uunet!wyse!mikew
  2. From: mikew@wyse.wyse.com (Mike Wexler)
  3. Newsgroups: comp.sources.x
  4. Subject: v02i049:  a colorful kaleidoscopic display, version 2, Part01/01
  5. Message-ID: <1925@wyse.wyse.com>
  6. Date: 22 Dec 88 17:24:20 GMT
  7. Organization: Wyse Technology, San Jose
  8. Lines: 991
  9. Approved: mikew@wyse.com
  10.  
  11. Submitted-by: natham@hp-pcs.hp.com (Nathan Meyers)
  12. Posting-number: Volume 2, Issue 49
  13. Archive-name: kaleid2/part01
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 1 (of 1)."
  22. # Contents:  README AUTHOR Makefile kaleid.1 kaleid.c kalicon.h
  23. #   patchlevel.h
  24. # Wrapped by mikew@wyse on Thu Dec 22 09:21:51 1988
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'README' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'README'\"
  28. else
  29. echo shar: Extracting \"'README'\" \(501 characters\)
  30. sed "s/^X//" >'README' <<'END_OF_FILE'
  31. XKaleid produces a colorful kaleidoscope display in an X11 window -- it
  32. Xwas ported from an MS-DOS program written for the EGA/VGA display.
  33. X
  34. XFor connoisseurs of window managers, this program does two interesting
  35. Xthings: 1) it creates and maintains a window icon, and 2) it observes
  36. Xwindow manager sizing hints for its window icon.
  37. X
  38. XTo make on bsd systems:
  39. X
  40. X    make
  41. X
  42. XTo make on systems of SYSV descent (such as hp-ux):
  43. X
  44. X    make SYSV
  45. X
  46. X---------------------
  47. XNathan Meyers
  48. XHewlett-Packard
  49. Xnathanm@hp-pcd.hp.com
  50. END_OF_FILE
  51. if test 501 -ne `wc -c <'README'`; then
  52.     echo shar: \"'README'\" unpacked with wrong size!
  53. fi
  54. # end of 'README'
  55. fi
  56. if test -f 'AUTHOR' -a "${1}" != "-c" ; then 
  57.   echo shar: Will not clobber existing file \"'AUTHOR'\"
  58. else
  59. echo shar: Extracting \"'AUTHOR'\" \(369 characters\)
  60. sed "s/^X//" >'AUTHOR' <<'END_OF_FILE'
  61. XThis X11 implementation is based on a public-domain kaleidoscope program
  62. Xby Judson D. McClendon of Sun Valley Systems (Birmingham, AL).
  63. XPermission granted to author to port to X11 and publish.
  64. X
  65. XX11 kaleid program by Nathan Meyers of Hewlett-Packard (internet mail
  66. Xaddress nathanm@hp-pcd.hp.com).  Permission granted to freely copy and
  67. Xdistribute on a non-profit basis.
  68. END_OF_FILE
  69. if test 369 -ne `wc -c <'AUTHOR'`; then
  70.     echo shar: \"'AUTHOR'\" unpacked with wrong size!
  71. fi
  72. # end of 'AUTHOR'
  73. fi
  74. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  75.   echo shar: Will not clobber existing file \"'Makefile'\"
  76. else
  77. echo shar: Extracting \"'Makefile'\" \(214 characters\)
  78. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  79. XCFLAGS=-O -I/global/include
  80. XLDFLAGS=-L/global/lib
  81. X
  82. Xkaleid:    kaleid.o
  83. X    cc kaleid.o $(CFLAGS) $(LDFLAGS) -o kaleid -lX11
  84. X
  85. Xkaleid.o:    kaleid.c kalicon.h
  86. X    cc -c $(CFLAGS) kaleid.c
  87. X
  88. XSYSV:
  89. X    @make "CFLAGS=$(CFLAGS) -DSYSV"
  90. END_OF_FILE
  91. if test 214 -ne `wc -c <'Makefile'`; then
  92.     echo shar: \"'Makefile'\" unpacked with wrong size!
  93. fi
  94. # end of 'Makefile'
  95. fi
  96. if test -f 'kaleid.1' -a "${1}" != "-c" ; then 
  97.   echo shar: Will not clobber existing file \"'kaleid.1'\"
  98. else
  99. echo shar: Extracting \"'kaleid.1'\" \(4591 characters\)
  100. sed "s/^X//" >'kaleid.1' <<'END_OF_FILE'
  101. X.TH KALEID 1
  102. X.PD
  103. X.ad b
  104. X.SH NAME
  105. Xkaleid \- X11 Kaleidoscope Display
  106. X.SH SYNOPSIS
  107. X.TP \w'\fBkaleid\fR 'u
  108. X\fBkaleid\fR
  109. X[\|\fB-display\fR displayname\|] [\|\fB-bg\fR background\|]
  110. X[\|\fB-bd\fR border\|] [\|\fB-bw\fR borderwidth\|]
  111. X[\|\fB-geometry\fR geometry\|] [\|\fB-delay\fR msec\|]
  112. X[\|\fB-icondelay\fR msec\|] [\|\fB-iconic\fR\|] [\|\fB-mono\fR\|]
  113. X[\|\fB-mult\fR number\|] [\|\fB-r\fR\|] [\|\fB-randomcolor\fR\|]
  114. X.SH HP-UX COMPATIBILITY
  115. X.TP 10
  116. XOrigin:
  117. XUser Contributed
  118. X.SH DESCRIPTION
  119. X.I Kaleid
  120. Xis an X11 port of Judson McClendon's EGA/VGA Kaleidoscope program from
  121. Xthe PC community.  \fIKaleid\fR runs a colorful kaleidoscope display in
  122. Xan X11 window.  The 16-color palette is chosen to approximate the
  123. Xdefault palette found on EGA and VGA displays.
  124. X.PP
  125. XWith window managers that support icon windows (such as \fIuwm\fR), the
  126. X\fIkaleid\fR icon is a small kaleidoscope window that runs a slow
  127. Xkaleidoscope display (see \fB-icondelay\fR option, below).
  128. X.PP
  129. XOptions:
  130. X.TP .5i
  131. X.B -display
  132. XSpecify display on which to run; defaults to contents of DISPLAY
  133. Xenvironment variable.
  134. X.TP
  135. X.B -bg
  136. XSpecify background color; defaults to black.
  137. X.TP
  138. X.B -bd
  139. XSpecify border color; defaults to white.
  140. X.TP
  141. X.B -bw
  142. XSpecify border width in pixels; defaults to 2.
  143. X.TP
  144. X.B -geometry
  145. XSpecify window geometry; defaults to =300x300+0+0.
  146. X.TP
  147. X.B -delay
  148. XSpecify a delay (in msec) to be performed between drawing each set of
  149. Xlines \(em can be used to avoid swamping the X11 server.  Defaults to 10
  150. X(100 when \fB-r\fR option, below, is used).
  151. X.TP
  152. X.B -icondelay
  153. XSpecify the delay to be used when drawing to the \fIkaleid\fR icon.
  154. XDefaults to 100 msec.
  155. X.TP
  156. X.B -iconic
  157. XCause \fIkaleid\fR to come up in the iconic state.
  158. X.TP
  159. X.B -mono
  160. XForce \fIkaleid\fR to run in monochrome mode (default behavior on
  161. Xa monochrome display).
  162. X.TP
  163. X.B -mult
  164. XRun specified number of \fIkaleid\fR windows.  Each window is a
  165. Xtop-level window with an associated icon.  See the note on WINDOW
  166. XMANAGER INTERACTIONS (below) for details on where the multiple windows
  167. Xget mapped.
  168. X.TP
  169. X.B -r
  170. XRun \fIkaleid\fR in the root window.  This option causes \fIkaleid\fR
  171. Xto ignore all options irrelevant to running in the root window.
  172. X.TP
  173. X.B -randomcolor
  174. XInstead of the standard palette, use a randomly-generated palette that
  175. Xis randomly changed at times during \fIkaleid\fR's execution.  This
  176. Xoption causes kaleid to allocate read/write color cells instead of
  177. Xread-only color cells, and will not work on a display whose default
  178. Xvisual type is StaticColor, StaticGray, or TrueColor.
  179. X.SH NOTE
  180. XSpecifying a delay (icondelay) value of 0 will cause kaleid to draw into
  181. Xits window (icon) at top speed, bogging down your server and, if
  182. X\fIkaleid\fR is run remotely, your network.  The default delay value
  183. Xwas chosen to work well on a fast CPU with a fast X server -- it is
  184. Xprobably too low for many systems.
  185. X.PP
  186. XIf \fIkaleid\fR and the server are running on the same CPU, running
  187. X\fIkaleid\fR with a higher nice (nice(1)) value will usually produce
  188. Xgood results without 1) swamping the server, and 2) requiring you to
  189. Ximpose an unpleasantly long delay.
  190. X.SH AUTHORSHIP
  191. XThere have been many different kaleidoscope programs for many different
  192. Xflavors of computers and PCs over the years.  This program was modified
  193. Xfrom the public-domain kaleidoscope program for IBM PCs by Judson D.
  194. XMcClendon (Sun Valley Systems, 329 37th Court N.E., Birmingham, AL,
  195. X35215, CompuServe address [74415,1003]).  The port to X11 was performed
  196. Xby Nathan Meyers of Hewlett-Packard (nathanm@hp-pcd.hp.com).
  197. X.SH WINDOW MANAGER INTERACTIONS
  198. XSome window managers do not appear to cope very well with window icons,
  199. Xresulting in strange icon behavior.  \fIUwm\fR does not suffer from this
  200. Xproblem, although problems can occur when changing window managers (to
  201. Xor from \fIuwm\fR) during execution of \fIkaleid\fR.
  202. X.PP
  203. XOn window managers that support window icons and that specify icon
  204. Xsizing hints, \fIkaleid\fR will respect the icon sizing hints, creating
  205. Xthe largest permissible icon.  Without icon sizing hints, the default
  206. Xicon size is 64x64.
  207. X.PP
  208. X\fIKaleid\fR maps all of its top-level windows to =+0+0 unless
  209. Xoverridden by a geometry string, and all of its icon windows to =+0+0.
  210. XWhere the windows and icons actually \fIend up\fR is a function of how
  211. Xyour window manager handles placement of windows and icons.  \fIUwm\fR,
  212. Xfor example, will request manual window placement for each top-level
  213. Xwindow if a geometry string is not specified, but will leave all icons
  214. Xmapped at =+0+0.  Conversely, with window managers that maintain
  215. Xgalleries or grids of icons, multiple \fIkaleid\fR icons can be
  216. Xspectacular.
  217. END_OF_FILE
  218. if test 4591 -ne `wc -c <'kaleid.1'`; then
  219.     echo shar: \"'kaleid.1'\" unpacked with wrong size!
  220. fi
  221. # end of 'kaleid.1'
  222. fi
  223. if test -f 'kaleid.c' -a "${1}" != "-c" ; then 
  224.   echo shar: Will not clobber existing file \"'kaleid.c'\"
  225. else
  226. echo shar: Extracting \"'kaleid.c'\" \(20946 characters\)
  227. sed "s/^X//" >'kaleid.c' <<'END_OF_FILE'
  228. X#include <stdio.h>
  229. X#include <X11/X.h>
  230. X#include <X11/Xlib.h>
  231. X#include <X11/Xutil.h>
  232. X#include <X11/Xos.h>
  233. X#include <signal.h>
  234. X#include "kalicon.h"
  235. X
  236. X/*
  237. X  KALEIDOSCOPE (X11 Version)
  238. X
  239. X  Original EGA/VGA version (for IBM PCs and compatibles) by:
  240. X    Judson D. McClendon
  241. X    Sun Valley Systems
  242. X    329 37th Court N.E.
  243. X    Birmingham, AL 35215
  244. X    Compuserve: [74415,1003]
  245. X
  246. X  Ported to X11 by Nathan Meyers, nathanm@hp-pcd.hp.com.
  247. X*/
  248. X
  249. Xchar *progname;
  250. X
  251. X
  252. X/* Approximation of CGA/EGA/VGA colors -- (out of standard order) */
  253. Xunsigned long colors[][3] = { { 0x0000, 0x0000, 0x0000 },    /* black */
  254. X                  { 0xffff, 0xffff, 0xffff },    /* bright white */
  255. X                  { 0x0000, 0x0000, 0xaaaa },    /* blue */
  256. X                  { 0x0000, 0xaaaa, 0x0000 },    /* green */
  257. X                  { 0x0000, 0xaaaa, 0xaaaa },    /* cyan */
  258. X                  { 0xaaaa, 0x0000, 0x0000 },    /* red */
  259. X                  { 0xaaaa, 0x0000, 0xaaaa },    /* magenta */
  260. X                  { 0xaaaa, 0x5555, 0x0000 },    /* brown */
  261. X                  { 0xaaaa, 0xaaaa, 0xaaaa },    /* white  */
  262. X                  { 0x5555, 0x5555, 0x5555 },    /* dark grey */
  263. X                  { 0x5555, 0x5555, 0xffff },    /* light blue */
  264. X                  { 0x5555, 0xffff, 0x5555 },    /* light green */
  265. X                  { 0x5555, 0xffff, 0xffff },    /* light cyan */
  266. X                  { 0xffff, 0x5555, 0x5555 },    /* light red */
  267. X                  { 0xffff, 0x5555, 0xffff },    /* light magenta */
  268. X                  { 0xffff, 0xffff, 0x5555 } };  /* yellow */
  269. X
  270. X#define NCOLORS 16
  271. X
  272. Xstatic char *what = "@(#)kaleid.c $Revision: 1.60 $";
  273. X
  274. XDisplay *display;
  275. Xint screen;
  276. X
  277. Xvoid refreshrootquit()
  278. X{
  279. X  XClearWindow(display,RootWindow(display,screen));
  280. X  XSync(display,0);
  281. X  exit(0);
  282. X}
  283. X
  284. Xint nwindows=1, nvisible=0;
  285. Xint *visible;
  286. XWindow *window;
  287. Xint *CX, *CY, *M;
  288. Xint *X1, *Y1, *X2, *Y2, *XV1, *YV1, *XV2, *YV2, *HC;
  289. Xint *XA, *YA, *XB, *YB, *XC, *YC, *XD, *YD;
  290. Xstruct timeval *schedule, *intervals;
  291. Xint numcolors;
  292. Xint dynamic_colors=0;
  293. Xunsigned long palette[NCOLORS];
  294. Xlong rndm();
  295. X
  296. Xmain(argc,argv)
  297. Xint argc;
  298. Xchar *argv[];
  299. X{
  300. X  unsigned long bgcolor, bdcolor;
  301. X  int bwidth = 2;
  302. X  int i;
  303. X  XSizeHints size_hints;
  304. X  XIconSize icon_size_hints, *icon_size_list;
  305. X  int numsizes, currsize;
  306. X  XWMHints wm_hints;
  307. X  char *displayname = NULL, *background = NULL, *border = NULL;
  308. X  char *geomstring = NULL;
  309. X  GC color_gcs[NCOLORS];
  310. X  XColor screen_in_out, visual_def_return, exact_def_return;
  311. X  int o_argc = argc;
  312. X  char **o_argv = argv;
  313. X  XEvent event;
  314. X  long time();
  315. X  int doroot = 0;
  316. X  int delayvalue = -1, icondelay=100;
  317. X  int iconic=0;
  318. X  int monochrome=0;
  319. X  char *basename, *strrchr();
  320. X
  321. X  progname = argv[0];
  322. X
  323. X  if ((basename=strrchr(progname,'/'))!=NULL) basename++;
  324. X  else basename=progname;
  325. X
  326. X  while (--argc>0) {
  327. X    char *option = (*++argv);
  328. X    if (!strcmp(option,"-display")) {
  329. X      if (--argc==0) usage();
  330. X      displayname = (*++argv);
  331. X    }
  332. X    else if (strchr(option,':')) {
  333. X      displayname = option;
  334. X    }
  335. X    else if (!strcmp(option,"-bg")) {
  336. X      if (--argc==0) usage();
  337. X      background = (*++argv);
  338. X    }
  339. X    else if (!strcmp(option,"-bd")) {
  340. X      if (--argc==0) usage();
  341. X      border = (*++argv);
  342. X    }
  343. X    else if (!strcmp(option,"-bw")) {
  344. X      if (--argc==0) usage();
  345. X      bwidth = atoi(*++argv);
  346. X      if (bwidth<0) bwidth = 0;
  347. X    }
  348. X    else if (!strcmp(option,"-delay")) {
  349. X      if (--argc==0) usage();
  350. X      delayvalue = atoi(*++argv);
  351. X      if (delayvalue<0) delayvalue = 0;
  352. X    }
  353. X    else if (!strcmp(option,"-icondelay")) {
  354. X      if (--argc==0) usage();
  355. X      icondelay = atoi(*++argv);
  356. X      if (icondelay<0) icondelay = 0;
  357. X    }
  358. X    else if (!strcmp(option,"-iconic")) {
  359. X      iconic = 1;
  360. X    }
  361. X    else if (!strcmp(option,"-geometry")) {
  362. X      if (--argc==0) usage();
  363. X      geomstring = (*++argv);
  364. X    }
  365. X    else if (*option=='=') {
  366. X      geomstring = option;
  367. X    }
  368. X    else if (!strcmp(option,"-mono")) {
  369. X      monochrome=1;
  370. X    }
  371. X    else if (!strcmp(option,"-mult")) {
  372. X      if (--argc==0) usage();
  373. X      nwindows = atoi(*++argv);
  374. X      if (nwindows<1) nwindows = 1;
  375. X    }
  376. X    else if (!strcmp(option,"-r")) {
  377. X      doroot = 1;
  378. X    }
  379. X    else if (!strcmp(option,"-root")) {
  380. X      doroot = 1;
  381. X    }
  382. X    else if (!strcmp(option,"-randomcolor")) {
  383. X      dynamic_colors = 1;
  384. X    }
  385. X    else usage();
  386. X  }
  387. X
  388. X  if (delayvalue == -1) delayvalue = doroot ? 100 : 10;
  389. X
  390. X  display = XOpenDisplay(displayname);
  391. X  if (display==NULL) {
  392. X    (void)fprintf(stderr,
  393. X              (displayname==NULL) ?
  394. X              "%s: Failed to open display.\n" :
  395. X              "%s: Failed to open display %s.\n",
  396. X              progname,displayname);
  397. X    exit(1);
  398. X  }
  399. X  screen = DefaultScreen(display);
  400. X
  401. X  if (background == NULL ||
  402. X      XAllocNamedColor(display,
  403. X               DefaultColormap(display,screen),
  404. X               background,
  405. X               &visual_def_return,
  406. X               &exact_def_return)==False)
  407. X    bgcolor = BlackPixel(display,screen);
  408. X  else bgcolor = exact_def_return.pixel;
  409. X
  410. X  if (border==NULL ||
  411. X      XAllocNamedColor(display,
  412. X               DefaultColormap(display,screen),
  413. X               border,
  414. X               &visual_def_return,
  415. X               &exact_def_return)==False)
  416. X   bdcolor = WhitePixel(display,screen);
  417. X  else bdcolor = exact_def_return.pixel;
  418. X
  419. X  if (!monochrome && DisplayCells(display,screen) > 2) {
  420. X    if (dynamic_colors) {
  421. X      for (numcolors=NCOLORS; numcolors>=2; numcolors--) {
  422. X    if (XAllocColorCells(display,DefaultColormap(display,screen),
  423. X                 0, (unsigned long *)NULL, 0,
  424. X                 palette, (unsigned int)numcolors) == True) {
  425. X      randomize_colors();
  426. X      break;
  427. X    }
  428. X      }
  429. X      if (numcolors < 2) fatalerror("Cannot allocate R/W color cells",NULL);
  430. X    }
  431. X    else {
  432. X      for (numcolors=0; numcolors<NCOLORS; numcolors++) {
  433. X        screen_in_out.flags = DoRed | DoGreen | DoBlue;
  434. X        screen_in_out.red = colors[numcolors][0];
  435. X        screen_in_out.green = colors[numcolors][1];
  436. X        screen_in_out.blue = colors[numcolors][2];
  437. X        if (XAllocColor(display, DefaultColormap(display,screen),
  438. X                &screen_in_out)==False) {
  439. X      if (numcolors < 2) fatalerror("Cannot allocate colors",NULL);
  440. X      break;
  441. X        }
  442. X        palette[numcolors] = screen_in_out.pixel;
  443. X      }
  444. X    }
  445. X  }
  446. X  else {
  447. X    numcolors=2;
  448. X    palette[0] = WhitePixel(display,screen);
  449. X    palette[1] = BlackPixel(display,screen);
  450. X  }
  451. X
  452. X  size_hints.x = 0;
  453. X  size_hints.y = 0;
  454. X  size_hints.width = 300;
  455. X  size_hints.height = 300;
  456. X
  457. X  size_hints.flags = PPosition | PSize;
  458. X  if (geomstring!=NULL) {
  459. X    int result;
  460. X    result = XParseGeometry(geomstring,&size_hints.x,&size_hints.y,
  461. X                    &size_hints.width,&size_hints.height);
  462. X    if (result & XNegative)
  463. X      size_hints.x += DisplayWidth(display,screen)
  464. X            - size_hints.width
  465. X            - bwidth*2;
  466. X    if (result & YNegative)
  467. X      size_hints.y += DisplayHeight(display,screen)
  468. X            - size_hints.height
  469. X            - bwidth*2;
  470. X    if (result & XValue || result & YValue) {
  471. X      size_hints.flags |= USPosition;
  472. X      size_hints.flags &= ~PPosition;
  473. X    }
  474. X    if (result & WidthValue || result & HeightValue) {
  475. X      size_hints.flags |= USSize;
  476. X      size_hints.flags &= ~PSize;
  477. X    }
  478. X  }
  479. X
  480. X  if (doroot) {
  481. X    char *calloc();
  482. X    if (!allocate_arrays(1)) {
  483. X      (void)fprintf(stderr,"%s: malloc() failure\n",progname);
  484. X      exit(1);
  485. X    }
  486. X    intervals[0].tv_sec = delayvalue/1000;
  487. X    intervals[0].tv_usec = (delayvalue % 1000) * 1000;
  488. X    window[0] = RootWindow(display,screen);
  489. X  }
  490. X  else {
  491. X    Pixmap bitmapicon;
  492. X    char *calloc();
  493. X
  494. X    if (!allocate_arrays((unsigned)(2*nwindows))) {
  495. X      (void)fprintf(stderr,"%s: malloc() failure\n",progname);
  496. X      exit(1);
  497. X    }
  498. X
  499. X    for (i=0; i<nwindows; i++)
  500. X      window[i] = XCreateSimpleWindow(display,RootWindow(display,screen),
  501. X                        size_hints.x,size_hints.y,
  502. X                        size_hints.width,size_hints.height,
  503. X                        bwidth,bdcolor,bgcolor);
  504. X
  505. X    icon_size_hints.max_width=64;
  506. X    icon_size_hints.max_height=64;
  507. X    currsize=0;
  508. X    if (XGetIconSizes(display,RootWindow(display,screen),
  509. X              &icon_size_list,&numsizes)) {
  510. X      for (i=1; i<numsizes; i++) {    /* Look for largest icon size */
  511. X    if (icon_size_list[i].max_width >= icon_size_list[currsize].max_width &&
  512. X        icon_size_list[i].max_height >= icon_size_list[currsize].max_height)
  513. X      currsize=i;
  514. X      }
  515. X      if (icon_size_list[currsize].max_width <= 0 ||
  516. X      icon_size_list[currsize].max_height <= 0 ) {
  517. X    XFree(icon_size_list);
  518. X        icon_size_list = &icon_size_hints;
  519. X      }
  520. X    }
  521. X    else
  522. X      icon_size_list = &icon_size_hints;
  523. X
  524. X    for (i=0; i<nwindows; i++) {
  525. X      window[i+nwindows] = XCreateSimpleWindow(display,
  526. X                      RootWindow(display,screen), 0,0,
  527. X                          icon_size_list[currsize].max_width,
  528. X                          icon_size_list[currsize].max_height,
  529. X                          2,BlackPixel(display,screen),
  530. X                          WhitePixel(display,screen));
  531. X
  532. X      CX[i+nwindows] = icon_size_list[currsize].max_width >> 1;
  533. X      CY[i+nwindows] = icon_size_list[currsize].max_height >> 1;
  534. X      M[i+nwindows] = (CX[i+nwindows]>CY[i+nwindows]) ?
  535. X             CX[i+nwindows] :
  536. X             CY[i+nwindows];
  537. X      M[i+nwindows] = M[i+nwindows] ? M[i+nwindows] : 1;
  538. X    }
  539. X
  540. X    if (icon_size_list != &icon_size_hints) XFree(icon_size_list);
  541. X
  542. X    for (i=0; i<nwindows; i++)
  543. X      XSetStandardProperties(display,window[i],"Kaleidoscope",basename,
  544. X                 None,o_argv,o_argc,&size_hints);
  545. X
  546. X    /* Create bitmap icon for wm's that don't support window icons */
  547. X    bitmapicon=XCreateBitmapFromData(display,RootWindow(display,screen),
  548. X                     icon_bits, icon_width, icon_height);
  549. X
  550. X    /* Use window icon for window managers that support one */
  551. X    wm_hints.icon_pixmap = bitmapicon;
  552. X    wm_hints.flags = IconPixmapHint | IconWindowHint;
  553. X
  554. X    if (iconic) {
  555. X      wm_hints.initial_state = IconicState;
  556. X      wm_hints.flags |= StateHint;
  557. X    }
  558. X
  559. X    for (i=0; i<nwindows; i++) {
  560. X      wm_hints.icon_window = window[i+nwindows];
  561. X      XSetWMHints(display,window[i],&wm_hints);
  562. X      XSelectInput(display,window[i],
  563. X    StructureNotifyMask|VisibilityChangeMask);
  564. X      XSelectInput(display,window[i+nwindows],
  565. X    StructureNotifyMask|VisibilityChangeMask);
  566. X      XMapWindow(display,window[i]);
  567. X
  568. X      intervals[i].tv_sec = delayvalue/1000;
  569. X      intervals[i].tv_usec = (delayvalue % 1000) * 1000;
  570. X      intervals[i+nwindows].tv_sec = icondelay/1000;
  571. X      intervals[i+nwindows].tv_usec = (icondelay % 1000) * 1000;
  572. X
  573. X      CX[i] = size_hints.width/2;
  574. X      CY[i] = size_hints.height/2;
  575. X      M[i] = (CX[i]>CY[i]) ? CX[i] : CY[i];
  576. X      M[i] = M[i] ? M[i] : 1;
  577. X    }
  578. X
  579. X  }
  580. X
  581. X  for (i = 0; i<numcolors; i++) {
  582. X    XGCValues values;
  583. X    values.foreground = palette[i];
  584. X    color_gcs[i] = XCreateGC(display,window[0],GCForeground,&values);
  585. X  }
  586. X
  587. X  nwindows <<= 1;
  588. X  if (doroot) {
  589. X    nwindows=1;
  590. X    nvisible=1;
  591. X    visible[0]=1;
  592. X  }
  593. X
  594. X  srand48(time((long *)NULL));
  595. X
  596. X  for (;;) {
  597. X    int winno;
  598. X    for (winno=0; winno<nwindows; winno++) if (visible[winno]) break;
  599. X    if (doroot) {
  600. X      int dontcare;
  601. X      Window wdontcare;
  602. X      struct sigvec vec;
  603. X      XGetGeometry(display,RootWindow(display,screen),&wdontcare,&dontcare,
  604. X           &dontcare, &CX[0], &CY[0], &dontcare, &dontcare);
  605. X      CX[0] >>= 1;
  606. X      CY[0] >>= 1;
  607. X      M[0] = (CX[0]>CY[0]) ? CX[0] : CY[0];
  608. X      M[0] = M[0] ? M[0] : 1;
  609. X      vec.sv_handler = refreshrootquit;
  610. X      vec.sv_mask = 0x0;
  611. X      vec.sv_flags = 0;
  612. X      (void)sigvec(SIGINT, &vec, (struct sigvec *)NULL);
  613. X      (void)sigvec(SIGQUIT, &vec, (struct sigvec *)NULL);
  614. X      (void)sigvec(SIGTERM, &vec, (struct sigvec *)NULL);
  615. X    }
  616. X    while (nvisible) {
  617. X      if (!rndm(50L)) {
  618. X        X1[winno] = rndm((long)M[winno]) + 1;
  619. X        X2[winno] = rndm((long)M[winno]) + 1;
  620. X        Y1[winno] = rndm((long)X1[winno]);
  621. X        Y2[winno] = rndm((long)X2[winno]);
  622. X      }
  623. X      if (!rndm(10L)) {
  624. X        XV1[winno] = rndm(7L)-3;
  625. X        XV2[winno] = rndm(7L)-3;
  626. X        YV1[winno] = rndm(7L)-3;
  627. X        YV2[winno] = rndm(7L)-3;
  628. X        HC[winno] = rndm((long)numcolors);
  629. X      }
  630. X      if (CX[winno]<CY[winno]) {
  631. X        XA[winno] = (long)X1[winno]*(long)CX[winno]/(long)CY[winno];
  632. X        YA[winno] = (long)Y1[winno]*(long)CX[winno]/(long)CY[winno];
  633. X        XB[winno] = X1[winno];
  634. X        YB[winno] = Y1[winno];
  635. X        XC[winno] = (long)X2[winno]*(long)CX[winno]/(long)CY[winno];
  636. X        YC[winno] = (long)Y2[winno]*(long)CX[winno]/(long)CY[winno];
  637. X        XD[winno] = X2[winno];
  638. X        YD[winno] = Y2[winno];
  639. X      }
  640. X      else {
  641. X        XA[winno] = X1[winno];
  642. X        YA[winno] = Y1[winno];
  643. X        XB[winno] = (long)X1[winno]*(long)CY[winno]/(long)CX[winno];
  644. X        YB[winno] = (long)Y1[winno]*(long)CY[winno]/(long)CX[winno];
  645. X        XC[winno] = X2[winno];
  646. X        YC[winno] = Y2[winno];
  647. X        XD[winno] = (long)X2[winno]*(long)CY[winno]/(long)CX[winno];
  648. X        YD[winno] = (long)Y2[winno]*(long)CY[winno]/(long)CX[winno];
  649. X      }
  650. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  651. X                CX[winno]+XA[winno],
  652. X                CY[winno]-YB[winno],
  653. X                CX[winno]+XC[winno],
  654. X                CY[winno]-YD[winno]);
  655. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  656. X                CX[winno]-YA[winno],
  657. X                CY[winno]+XB[winno],
  658. X                CX[winno]-YC[winno],
  659. X                CY[winno]+XD[winno]);
  660. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  661. X                CX[winno]-XA[winno],
  662. X                CY[winno]-YB[winno],
  663. X                CX[winno]-XC[winno],
  664. X                CY[winno]-YD[winno]);
  665. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  666. X                CX[winno]-YA[winno],
  667. X                CY[winno]-XB[winno],
  668. X                CX[winno]-YC[winno],
  669. X                CY[winno]-XD[winno]);
  670. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  671. X                CX[winno]-XA[winno],
  672. X                CY[winno]+YB[winno],
  673. X                CX[winno]-XC[winno],
  674. X                CY[winno]+YD[winno]);
  675. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  676. X                CX[winno]+YA[winno],
  677. X                CY[winno]-XB[winno],
  678. X                CX[winno]+YC[winno],
  679. X                CY[winno]-XD[winno]);
  680. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  681. X                CX[winno]+XA[winno],
  682. X                CY[winno]+YB[winno],
  683. X                CX[winno]+XC[winno],
  684. X                CY[winno]+YD[winno]);
  685. X      XDrawLine(display,window[winno],color_gcs[HC[winno]],
  686. X                CX[winno]+YA[winno],
  687. X                CY[winno]+XB[winno],
  688. X                CX[winno]+YC[winno],
  689. X                CY[winno]+XD[winno]);
  690. X      XFlush(display);
  691. X      X1[winno]= (X1[winno] + XV1[winno]) % M[winno];
  692. X      Y1[winno]= (Y1[winno] + YV1[winno]) % M[winno];
  693. X      X2[winno]= (X2[winno] + XV2[winno]) % M[winno];
  694. X      Y2[winno]= (Y2[winno] + YV2[winno]) % M[winno];
  695. X      if (!rndm(500L)) XClearWindow(display,window[winno]);
  696. X      if (dynamic_colors && !rndm((long)(800/numcolors))) randomize_color();
  697. X      winno=scheduler();
  698. X      if (XCheckMaskEvent(display,~0L,&event)==True) handle_event(&event);
  699. X    }
  700. X    XNextEvent(display,&event);
  701. X    handle_event(&event);
  702. X  }
  703. X}
  704. X
  705. Xrandomize_color()
  706. X{
  707. X  int i;
  708. X  XColor color;
  709. X  color.pixel = palette[rndm((long)numcolors)];
  710. X  color.red = rndm(65535L);
  711. X  color.green = rndm(65535L);
  712. X  color.blue = rndm(65535L);
  713. X  color.flags = DoRed|DoGreen|DoBlue;
  714. X  XStoreColor(display, DefaultColormap(display,screen), &color);
  715. X}
  716. X
  717. Xrandomize_colors()
  718. X{
  719. X  int i;
  720. X  XColor color[NCOLORS];
  721. X  for (i=0; i<numcolors; i++) {
  722. X    color[i].pixel = palette[i];
  723. X    color[i].red = rndm(65535L);
  724. X    color[i].green = rndm(65535L);
  725. X    color[i].blue = rndm(65535L);
  726. X    color[i].flags = DoRed|DoGreen|DoBlue;
  727. X  }
  728. X  XStoreColors(display, DefaultColormap(display,screen), color, numcolors);
  729. X}
  730. X
  731. Xhandle_event(event)
  732. XXEvent *event;
  733. X{
  734. X  int i;
  735. X  if (event->type==ConfigureNotify) {
  736. X    for (i=0; i<nwindows; i++) {
  737. X      if (event->xconfigure.window==window[i]) {
  738. X        if (CX[i] != event->xconfigure.width/2 ||
  739. X            CY[i] != event->xconfigure.height/2)
  740. X      XClearWindow(display,event->xconfigure.window);
  741. X        CX[i] = event->xconfigure.width/2;
  742. X        CY[i] = event->xconfigure.height/2;
  743. X        M[i] = (CX[i]>CY[i]) ? CX[i] : CY[i];
  744. X        M[i] = M[i] ? M[i] : 1;
  745. X        break;
  746. X      }
  747. X    }
  748. X  }
  749. X  else if (event->type==MapNotify) {
  750. X    for (i=0; i<nwindows; i++) {
  751. X      if (event->xmap.window==window[i]) {
  752. X        X1[i] = rndm((long)M[i]) + 1;
  753. X        X2[i] = rndm((long)M[i]) + 1;
  754. X        Y1[i] = rndm((long)X1[i]);
  755. X        Y2[i] = rndm((long)X2[i]);
  756. X        XV1[i] = rndm(7L)-3;
  757. X        XV2[i] = rndm(7L)-3;
  758. X        YV1[i] = rndm(7L)-3;
  759. X        YV2[i] = rndm(7L)-3;
  760. X        HC[i] = rndm((long)numcolors);
  761. X        break;
  762. X      }
  763. X    }
  764. X  }
  765. X  else if (event->type==VisibilityNotify) {
  766. X    for (i=0; i<nwindows; i++) {
  767. X      if (event->xvisibility.window==window[i]) {
  768. X    if (visible[i] &&
  769. X        event->xvisibility.state == VisibilityFullyObscured) {
  770. X          visible[i]=0;
  771. X          nvisible--;
  772. X    }
  773. X    else if (!visible[i] &&
  774. X         event->xvisibility.state != VisibilityFullyObscured) {
  775. X          visible[i]=1;
  776. X          nvisible++;
  777. X    }
  778. X        break;
  779. X      }
  780. X    }
  781. X  }
  782. X}
  783. X
  784. Xusage()
  785. X{
  786. X  int i;
  787. X  (void)fprintf(stderr,"Usage: %s [-display <displayname>] [-bg <background>]",
  788. X      progname);
  789. X  (void)fprintf(stderr," [-bd <border>]\n");
  790. X  for (i = 0; i<(strlen(progname)+8); i++) (void)putc(' ',stderr);
  791. X  (void)fprintf(stderr,"[-bw <borderwidth>] [-geometry <geometry>]");
  792. X  (void)fprintf(stderr," [-delay <msec>]\n");
  793. X  for (i = 0; i<(strlen(progname)+8); i++) (void)putc(' ',stderr);
  794. X  (void)fprintf(stderr,"[-icondelay <msec>] [-iconic] [-mono]");
  795. X  (void)fprintf(stderr," [-mult <number>] -r\n");
  796. X  for (i = 0; i<(strlen(progname)+8); i++) (void)putc(' ',stderr);
  797. X  (void)fprintf(stderr,"[-randomcolor]\n");
  798. X  exit(1);
  799. X}
  800. X
  801. Xfatalerror(s1,s2)
  802. Xchar *s1,*s2;
  803. X{
  804. X  (void)fprintf(stderr,"%s: ",progname);
  805. X  (void)fprintf(stderr,s1,s2);
  806. X  (void)putc('\n',stderr);
  807. X  exit(1);
  808. X}
  809. X
  810. Xlong rndm(maxval)
  811. Xlong maxval;
  812. X{
  813. X  long lrand48();
  814. X  return ((lrand48() >> 15) * maxval) >> 16;
  815. X}
  816. X
  817. Xallocate_arrays(nwin)
  818. Xunsigned nwin;
  819. X{
  820. X  char *calloc();
  821. X  if ((window=(Window *)calloc(nwin,sizeof(Window))) == NULL) return 0;
  822. X  if ((CX=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  823. X  if ((CY=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  824. X  if ((M=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  825. X  if ((visible=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  826. X  if ((X1=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  827. X  if ((Y1=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  828. X  if ((X2=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  829. X  if ((Y2=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  830. X  if ((XV1=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  831. X  if ((YV1=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  832. X  if ((XV2=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  833. X  if ((YV2=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  834. X  if ((HC=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  835. X  if ((XA=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  836. X  if ((YA=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  837. X  if ((XB=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  838. X  if ((YB=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  839. X  if ((XC=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  840. X  if ((YC=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  841. X  if ((XD=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  842. X  if ((YD=(int *)calloc(nwin,sizeof(int))) == NULL) return 0;
  843. X  if ((schedule=(struct timeval *)calloc(nwin,sizeof(struct timeval))) == NULL)
  844. X    return 0;
  845. X  if ((intervals=(struct timeval *)calloc(nwin,sizeof(struct timeval))) == NULL)
  846. X    return 0;
  847. X  return 1;
  848. X}
  849. X
  850. Xint scheduler()
  851. X{
  852. X  struct timeval currtime, *nextalarm, *alarmindex;
  853. X  struct timezone tzp;
  854. X  int i;
  855. X
  856. X  /* Get current time */
  857. X  (void)gettimeofday(&currtime, &tzp);
  858. X
  859. X  /* Find earliest alarm due */
  860. X  alarmindex = nextalarm = schedule;
  861. X  for (i=1; i<nwindows; i++) {
  862. X    if (visible[++alarmindex - schedule] &&
  863. X    ( alarmindex->tv_sec < nextalarm->tv_sec ||
  864. X          alarmindex->tv_sec == nextalarm->tv_sec &&
  865. X          alarmindex->tv_usec < nextalarm->tv_usec ))
  866. X      nextalarm = alarmindex;
  867. X  }
  868. X
  869. X  /* If the next alarm is not past due, sleep until it comes due */
  870. X  if (currtime.tv_sec < nextalarm->tv_sec ||
  871. X      currtime.tv_sec == nextalarm->tv_sec &&
  872. X      currtime.tv_usec < nextalarm->tv_usec) {
  873. X    struct timeval timeout;
  874. X    int fd=ConnectionNumber(display), readfds;
  875. X
  876. X    timeout.tv_sec = 0;
  877. X    timeout.tv_usec = 0;
  878. X    timeout.tv_sec = nextalarm->tv_sec - currtime.tv_sec;
  879. X    timeout.tv_usec = nextalarm->tv_usec - currtime.tv_usec;
  880. X    if (timeout.tv_usec < 0) {
  881. X      timeout.tv_sec -= 1L;
  882. X      timeout.tv_usec += 1000000L;
  883. X    }
  884. X
  885. X    readfds = 1<<fd;
  886. X    (void)select(fd+1, &readfds, NULL, NULL, &timeout);
  887. X
  888. X    /* Recompute current time */
  889. X    (void)gettimeofday(&currtime, &tzp);
  890. X
  891. X  }
  892. X
  893. X  /* Set next alarm to current time + interval */
  894. X  nextalarm->tv_sec = currtime.tv_sec + intervals[nextalarm-schedule].tv_sec;
  895. X  nextalarm->tv_usec = currtime.tv_usec + intervals[nextalarm-schedule].tv_usec;
  896. X  if (nextalarm->tv_usec >= 1000000) {
  897. X    nextalarm->tv_sec += 1;
  898. X    nextalarm->tv_usec -= 1000000;
  899. X  }
  900. X
  901. X  /* Return index of next alarm */
  902. X  return nextalarm-schedule;
  903. X}
  904. END_OF_FILE
  905. if test 20946 -ne `wc -c <'kaleid.c'`; then
  906.     echo shar: \"'kaleid.c'\" unpacked with wrong size!
  907. fi
  908. # end of 'kaleid.c'
  909. fi
  910. if test -f 'kalicon.h' -a "${1}" != "-c" ; then 
  911.   echo shar: Will not clobber existing file \"'kalicon.h'\"
  912. else
  913. echo shar: Extracting \"'kalicon.h'\" \(3360 characters\)
  914. sed "s/^X//" >'kalicon.h' <<'END_OF_FILE'
  915. X/* Kaleidoscope icon -- for window managers that do not support window
  916. X   icons. */
  917. X
  918. X#define icon_width 64
  919. X#define icon_height 64
  920. Xstatic char icon_bits[] = {
  921. X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  922. X   0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff,
  923. X   0xff, 0xf3, 0xff, 0xbb, 0xbb, 0xff, 0x9f, 0xff, 0xff, 0xcf, 0xff, 0x77,
  924. X   0xdd, 0xff, 0xe7, 0xff, 0xff, 0x33, 0xff, 0x6f, 0xed, 0xff, 0x99, 0xff,
  925. X   0xff, 0xcf, 0xfc, 0xeb, 0xae, 0x7f, 0xe6, 0xff, 0xff, 0x3f, 0xf3, 0x57,
  926. X   0xd4, 0x9f, 0xf9, 0xff, 0xff, 0xcf, 0xc8, 0x37, 0xd9, 0x27, 0xe6, 0xff,
  927. X   0xfb, 0x3f, 0x27, 0x2b, 0xa9, 0xc9, 0xf9, 0xbf, 0xd7, 0xff, 0x9c, 0x94,
  928. X   0x52, 0x72, 0xfe, 0xd7, 0xd7, 0xbf, 0x73, 0x90, 0x12, 0x9c, 0xf9, 0xd7,
  929. X   0xaf, 0x7e, 0xce, 0x03, 0x81, 0x67, 0xfe, 0xea, 0xaf, 0xfe, 0x39, 0x07,
  930. X   0x81, 0x99, 0xff, 0xea, 0x5f, 0xf5, 0xe6, 0x00, 0x00, 0xe6, 0x5e, 0xf5,
  931. X   0x5f, 0xed, 0x99, 0x03, 0x80, 0x39, 0x5f, 0xf5, 0xbf, 0xaa, 0x67, 0x06,
  932. X   0x41, 0xce, 0xab, 0xfa, 0xbf, 0x5a, 0x9b, 0x11, 0x88, 0xb3, 0xad, 0xfa,
  933. X   0x7f, 0x56, 0x65, 0x02, 0x81, 0x4c, 0xd5, 0xfc, 0x7f, 0xb5, 0x9a, 0x01,
  934. X   0x00, 0xb3, 0x56, 0xfd, 0xff, 0xac, 0x6a, 0x20, 0x08, 0xac, 0x6a, 0xfe,
  935. X   0xff, 0x6a, 0x95, 0x08, 0x01, 0x52, 0xab, 0xfe, 0xff, 0x59, 0x55, 0x22,
  936. X   0x81, 0x54, 0x35, 0xff, 0xff, 0xd5, 0xaa, 0x28, 0x08, 0xaa, 0x55, 0xff,
  937. X   0xff, 0xb3, 0x0a, 0x98, 0x32, 0xa0, 0x9a, 0xff, 0xff, 0xb3, 0x45, 0x64,
  938. X   0x4c, 0xc4, 0x9a, 0xff, 0xb7, 0x25, 0x01, 0x4a, 0xa4, 0x00, 0x41, 0xdb,
  939. X   0x6f, 0x02, 0x00, 0x05, 0x41, 0x0b, 0x80, 0xec, 0x9f, 0x0d, 0x02, 0x21,
  940. X   0x08, 0x01, 0x60, 0xf3, 0x7f, 0x03, 0x90, 0x12, 0x91, 0x96, 0x80, 0xfd,
  941. X   0xf7, 0x00, 0x00, 0xc6, 0xc7, 0x00, 0x00, 0xde, 0x4f, 0x0c, 0x00, 0xc1,
  942. X   0x07, 0x01, 0x60, 0xe4, 0xbf, 0x33, 0x65, 0xe8, 0x2f, 0x4c, 0x99, 0xf9,
  943. X   0x4f, 0x0c, 0x00, 0xc1, 0x07, 0x01, 0x60, 0xe4, 0xf7, 0x00, 0x00, 0xc6,
  944. X   0xc7, 0x00, 0x00, 0xde, 0x7f, 0x03, 0x90, 0x12, 0x91, 0x96, 0x80, 0xfd,
  945. X   0x9f, 0x0d, 0x02, 0x21, 0x08, 0x01, 0x60, 0xf3, 0x6f, 0x02, 0x00, 0x05,
  946. X   0x41, 0x0b, 0x80, 0xec, 0xb7, 0x25, 0x01, 0x4a, 0xa4, 0x00, 0x41, 0xdb,
  947. X   0xff, 0xb3, 0x45, 0x64, 0x4c, 0xc4, 0x9a, 0xff, 0xff, 0xb3, 0x0a, 0x98,
  948. X   0x32, 0xa0, 0x9a, 0xff, 0xff, 0xd5, 0xaa, 0x28, 0x08, 0xaa, 0x55, 0xff,
  949. X   0xff, 0x59, 0x55, 0x22, 0x81, 0x54, 0x35, 0xff, 0xff, 0x6a, 0x95, 0x08,
  950. X   0x01, 0x52, 0xab, 0xfe, 0xff, 0xac, 0x6a, 0x20, 0x08, 0xac, 0x6a, 0xfe,
  951. X   0x7f, 0xb5, 0x9a, 0x01, 0x00, 0xb3, 0x56, 0xfd, 0x7f, 0x56, 0x65, 0x02,
  952. X   0x81, 0x4c, 0xd5, 0xfc, 0xbf, 0x5a, 0x9b, 0x11, 0x88, 0xb3, 0xad, 0xfa,
  953. X   0xbf, 0xaa, 0x67, 0x06, 0x41, 0xce, 0xab, 0xfa, 0x5f, 0xed, 0x99, 0x03,
  954. X   0x80, 0x39, 0x5f, 0xf5, 0x5f, 0xf5, 0xe6, 0x00, 0x00, 0xe6, 0x5e, 0xf5,
  955. X   0xaf, 0xfe, 0x39, 0x07, 0x81, 0x99, 0xff, 0xea, 0xaf, 0x7e, 0xce, 0x03,
  956. X   0x81, 0x67, 0xfe, 0xea, 0xd7, 0xbf, 0x73, 0x90, 0x12, 0x9c, 0xf9, 0xd7,
  957. X   0xd7, 0xff, 0x9c, 0x94, 0x52, 0x72, 0xfe, 0xd7, 0xfb, 0x3f, 0x27, 0x2b,
  958. X   0xa9, 0xc9, 0xf9, 0xbf, 0xff, 0xcf, 0xc8, 0x37, 0xd9, 0x27, 0xe6, 0xff,
  959. X   0xff, 0x3f, 0xf3, 0x57, 0xd4, 0x9f, 0xf9, 0xff, 0xff, 0xcf, 0xfc, 0xeb,
  960. X   0xae, 0x7f, 0xe6, 0xff, 0xff, 0x33, 0xff, 0x6f, 0xed, 0xff, 0x99, 0xff,
  961. X   0xff, 0xcf, 0xff, 0x77, 0xdd, 0xff, 0xe7, 0xff, 0xff, 0xf3, 0xff, 0xbb,
  962. X   0xbb, 0xff, 0x9f, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff,
  963. X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
  964. END_OF_FILE
  965. if test 3360 -ne `wc -c <'kalicon.h'`; then
  966.     echo shar: \"'kalicon.h'\" unpacked with wrong size!
  967. fi
  968. # end of 'kalicon.h'
  969. fi
  970. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  971.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  972. else
  973. echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
  974. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  975. X#define PATCHLEVEL 2
  976. END_OF_FILE
  977. if test 21 -ne `wc -c <'patchlevel.h'`; then
  978.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  979. fi
  980. # end of 'patchlevel.h'
  981. fi
  982. echo shar: End of archive 1 \(of 1\).
  983. cp /dev/null ark1isdone
  984. MISSING=""
  985. for I in 1 ; do
  986.     if test ! -f ark${I}isdone ; then
  987.     MISSING="${MISSING} ${I}"
  988.     fi
  989. done
  990. if test "${MISSING}" = "" ; then
  991.     echo You have the archive.
  992.     rm -f ark[1-9]isdone
  993. else
  994.     echo You still need to unpack the following archives:
  995.     echo "        " ${MISSING}
  996. fi
  997. ##  End of shell archive.
  998. exit 0
  999. -- 
  1000. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  1001. Moderator of comp.sources.x
  1002.